using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._DataManagementTools._AttributeRules
{
    /// <summary>
    /// <para>Reorder Attribute Rule</para>
    /// <para>Reorders the evaluation order of an attribute rule.</para>
    /// <para>对属性规则的评估顺序重新排序。</para>
    /// </summary>    
    [DisplayName("Reorder Attribute Rule")]
    public class ReorderAttributeRule : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public ReorderAttributeRule()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_table">
        /// <para>Input Table</para>
        /// <para>The table that contains the attribute rule.</para>
        /// <para>包含属性规则的表。</para>
        /// </param>
        /// <param name="_name">
        /// <para>Calculation Rule Name</para>
        /// <para>The name of the calculation rule that will have its evaluation order altered.</para>
        /// <para>将更改其计算顺序的计算规则的名称。</para>
        /// </param>
        /// <param name="_evaluation_order">
        /// <para>Evaluation Order</para>
        /// <para>The new evaluation order value for the rule. For example, if you have 5 rules and this rule is ordered to execute last (the fifth position) but you want it to be evaluated in the second position, enter the value 2. The evaluation order values for the rules after position 2 will be reassigned to follow this rule (for example, position 2 becomes position 3, position 3 becomes position 4, and position 4 becomes position 5).</para>
        /// <para>规则的新评估顺序值。例如，如果您有 5 条规则，并且此规则被命令在最后执行（第 5 个位置），但您希望在第二个位置计算它，请输入值 2。位置 2 之后的规则的评估顺序值将重新分配以遵循此规则（例如，位置 2 变为位置 3，位置 3 变为位置 4，位置 4 变为位置 5）。</para>
        /// </param>
        public ReorderAttributeRule(object _in_table, object _name, long? _evaluation_order)
        {
            this._in_table = _in_table;
            this._name = _name;
            this._evaluation_order = _evaluation_order;
        }
        public override string ToolboxName => "Data Management Tools";

        public override string ToolName => "Reorder Attribute Rule";

        public override string CallName => "management.ReorderAttributeRule";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_table, _name, _evaluation_order, _updated_table];

        /// <summary>
        /// <para>Input Table</para>
        /// <para>The table that contains the attribute rule.</para>
        /// <para>包含属性规则的表。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input Table")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_table { get; set; }


        /// <summary>
        /// <para>Calculation Rule Name</para>
        /// <para>The name of the calculation rule that will have its evaluation order altered.</para>
        /// <para>将更改其计算顺序的计算规则的名称。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Calculation Rule Name")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _name { get; set; }


        /// <summary>
        /// <para>Evaluation Order</para>
        /// <para>The new evaluation order value for the rule. For example, if you have 5 rules and this rule is ordered to execute last (the fifth position) but you want it to be evaluated in the second position, enter the value 2. The evaluation order values for the rules after position 2 will be reassigned to follow this rule (for example, position 2 becomes position 3, position 3 becomes position 4, and position 4 becomes position 5).</para>
        /// <para>规则的新评估顺序值。例如，如果您有 5 条规则，并且此规则被命令在最后执行（第 5 个位置），但您希望在第二个位置计算它，请输入值 2。位置 2 之后的规则的评估顺序值将重新分配以遵循此规则（例如，位置 2 变为位置 3，位置 3 变为位置 4，位置 4 变为位置 5）。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Evaluation Order")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public long? _evaluation_order { get; set; }


        /// <summary>
        /// <para>Updated Table</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated Table")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _updated_table { get; set; }


        public ReorderAttributeRule SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}